import React, { Component } from 'react'
import { HashRouter, Switch, Route, Link } from 'react-router-dom'
import Home from './Home'
import About from './About'
import Topics from './Topics'

class Main extends Component {

    render() {
        return (
            <HashRouter>
                <div>
                    <ul>
                        <li>
                            <Link to="/">Home</Link>
                        </li>
                        <li>
                            <Link to="/about">About</Link>
                        </li>
                        <li>
                            <Link to="/topics">Topics</Link>
                        </li>
                    </ul>
                    <hr />
                    <Switch>
                        <Route path="/" exact component={Home}></Route>
                        <Route path="/about" exact component={About}></Route>
                        <Route path="/topics" exact component={Topics}></Route>
                    </Switch>

                </div>


            </HashRouter>
        )
    }
}

export default Main